<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="${pageContext.request.contextPath}" var="path"
	scope="page" />
<!--文章审核 具体内容-->
<div class="main_tag">求知广场管理>博客管理>文章审核</div>
<div class="sysm1_udiv">
	<!--内容框-->
	<div class="innertag_box">
		<a class="innertag block1" href="#">返回</a>
	</div>
	<div class="innerdetail_box">
		<table width="100%">
			<tr>
				<td>文章标题：${blog.title}</td>
			</tr>
			<tr>
				<td>发布人：${blog.author}</td>
			</tr>
			<tr>
				<td>发布时间：${blog.time}</td>
			</tr>
			<tr>
				<td style="border-top: #CCC 1px solid">内容：${blog.content }</td>
			</tr>
		</table>
	</div>
</div>
<!--审核按钮-->
<div class="innertag_box">
	<c:choose>
		<c:when test="${blog.checked}">
			<a class="innertag blores" href="#">已通过审核</a>
		</c:when>
		<c:otherwise>
			<a id="check_f" class="innertag blores" href="#">删除</a> 
			<a id="check_t" class="innertag blores" href="#">通过审核</a>
		</c:otherwise>
	</c:choose>
</div>

<Script>
	/* confirm */
	$("#check_t").click(function(){
		$.post("${path}/CheckBlogController",{
			blogId:"${blog.blogId}",
			checked:"true"
			},function(data){
				alert(data);
				$('#load').load("${path}/ShowBlogController",{x:0});
			});
	});
	
	/* delete */
	$("#check_f").click(function(){
		$.post("${path}/CheckBlogController",{
			blogId:"${blog.blogId}"
		},function(data){
			alert(data);
			$('#load').load("${path}/ShowBlogController",{x:0});
		});
	});
	
	
	/* return */
	$(".innertag_box").find(".block1").click(function() {
		$('#load').load("${path}/ShowBlogController",{x:0});
	});
	
</Script>